import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/enterprise/enterprise_information_get_entity.dart';

EnterpriseInformationGetEntity $EnterpriseInformationGetEntityFromJson(Map<String, dynamic> json) {
  final EnterpriseInformationGetEntity enterpriseInformationGetEntity = EnterpriseInformationGetEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseInformationGetEntity.id = id;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseInformationGetEntity.createTime = createTime;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    enterpriseInformationGetEntity.companyId = companyId;
  }
  final String? enterpriseName = jsonConvert.convert<String>(json['enterpriseName']);
  if (enterpriseName != null) {
    enterpriseInformationGetEntity.enterpriseName = enterpriseName;
  }
  final String? enterpriseAddress = jsonConvert.convert<String>(json['enterpriseAddress']);
  if (enterpriseAddress != null) {
    enterpriseInformationGetEntity.enterpriseAddress = enterpriseAddress;
  }
  final String? creditCode = jsonConvert.convert<String>(json['creditCode']);
  if (creditCode != null) {
    enterpriseInformationGetEntity.creditCode = creditCode;
  }
  final String? registeredCapital = jsonConvert.convert<String>(json['registeredCapital']);
  if (registeredCapital != null) {
    enterpriseInformationGetEntity.registeredCapital = registeredCapital;
  }
  final String? securityManager = jsonConvert.convert<String>(json['securityManager']);
  if (securityManager != null) {
    enterpriseInformationGetEntity.securityManager = securityManager;
  }
  final String? securityManagerNumber = jsonConvert.convert<String>(json['securityManagerNumber']);
  if (securityManagerNumber != null) {
    enterpriseInformationGetEntity.securityManagerNumber = securityManagerNumber;
  }
  final String? enterpriseWeb = jsonConvert.convert<String>(json['enterpriseWeb']);
  if (enterpriseWeb != null) {
    enterpriseInformationGetEntity.enterpriseWeb = enterpriseWeb;
  }
  final String? legalRepresentative = jsonConvert.convert<String>(json['legalRepresentative']);
  if (legalRepresentative != null) {
    enterpriseInformationGetEntity.legalRepresentative = legalRepresentative;
  }
  final String? legalRepresentativeNumber = jsonConvert.convert<String>(json['legalRepresentativeNumber']);
  if (legalRepresentativeNumber != null) {
    enterpriseInformationGetEntity.legalRepresentativeNumber = legalRepresentativeNumber;
  }
  final int? industryId = jsonConvert.convert<int>(json['industryId']);
  if (industryId != null) {
    enterpriseInformationGetEntity.industryId = industryId;
  }
  final String? industryName = jsonConvert.convert<String>(json['industryName']);
  if (industryName != null) {
    enterpriseInformationGetEntity.industryName = industryName;
  }
  final String? businessLicense = jsonConvert.convert<String>(json['businessLicense']);
  if (businessLicense != null) {
    enterpriseInformationGetEntity.businessLicense = businessLicense;
  }
  final String? businessTermStart = jsonConvert.convert<String>(json['businessTermStart']);
  if (businessTermStart != null) {
    enterpriseInformationGetEntity.businessTermStart = businessTermStart;
  }
  final String? businessTermEnd = jsonConvert.convert<String>(json['businessTermEnd']);
  if (businessTermEnd != null) {
    enterpriseInformationGetEntity.businessTermEnd = businessTermEnd;
  }
  final int? businessTermRemind = jsonConvert.convert<int>(json['businessTermRemind']);
  if (businessTermRemind != null) {
    enterpriseInformationGetEntity.businessTermRemind = businessTermRemind;
  }
  final int? businessRemindId = jsonConvert.convert<int>(json['businessRemindId']);
  if (businessRemindId != null) {
    enterpriseInformationGetEntity.businessRemindId = businessRemindId;
  }
  final String? businessRemindName = jsonConvert.convert<String>(json['businessRemindName']);
  if (businessRemindName != null) {
    enterpriseInformationGetEntity.businessRemindName = businessRemindName;
  }
  final String? securotyLicense = jsonConvert.convert<String>(json['securotyLicense']);
  if (securotyLicense != null) {
    enterpriseInformationGetEntity.securotyLicense = securotyLicense;
  }
  final String? securotyTermStart = jsonConvert.convert<String>(json['securotyTermStart']);
  if (securotyTermStart != null) {
    enterpriseInformationGetEntity.securotyTermStart = securotyTermStart;
  }
  final String? securotyTermEnd = jsonConvert.convert<String>(json['securotyTermEnd']);
  if (securotyTermEnd != null) {
    enterpriseInformationGetEntity.securotyTermEnd = securotyTermEnd;
  }
  final int? securotyTermRemind = jsonConvert.convert<int>(json['securotyTermRemind']);
  if (securotyTermRemind != null) {
    enterpriseInformationGetEntity.securotyTermRemind = securotyTermRemind;
  }
  final int? securotyRemindId = jsonConvert.convert<int>(json['securotyRemindId']);
  if (securotyRemindId != null) {
    enterpriseInformationGetEntity.securotyRemindId = securotyRemindId;
  }
  final String? securotyRemindName = jsonConvert.convert<String>(json['securotyRemindName']);
  if (securotyRemindName != null) {
    enterpriseInformationGetEntity.securotyRemindName = securotyRemindName;
  }
  final String? dangerLicense = jsonConvert.convert<String>(json['dangerLicense']);
  if (dangerLicense != null) {
    enterpriseInformationGetEntity.dangerLicense = dangerLicense;
  }
  final String? dangerTermStart = jsonConvert.convert<String>(json['dangerTermStart']);
  if (dangerTermStart != null) {
    enterpriseInformationGetEntity.dangerTermStart = dangerTermStart;
  }
  final String? dangerTermEnd = jsonConvert.convert<String>(json['dangerTermEnd']);
  if (dangerTermEnd != null) {
    enterpriseInformationGetEntity.dangerTermEnd = dangerTermEnd;
  }
  final int? dangerTermRemind = jsonConvert.convert<int>(json['dangerTermRemind']);
  if (dangerTermRemind != null) {
    enterpriseInformationGetEntity.dangerTermRemind = dangerTermRemind;
  }
  final int? dangerRemindId = jsonConvert.convert<int>(json['dangerRemindId']);
  if (dangerRemindId != null) {
    enterpriseInformationGetEntity.dangerRemindId = dangerRemindId;
  }
  final String? dangerRemindName = jsonConvert.convert<String>(json['dangerRemindName']);
  if (dangerRemindName != null) {
    enterpriseInformationGetEntity.dangerRemindName = dangerRemindName;
  }
  final String? safetyProductionName = jsonConvert.convert<String>(json['safetyProductionName']);
  if (safetyProductionName != null) {
    enterpriseInformationGetEntity.safetyProductionName = safetyProductionName;
  }
  final String? safetyProductionCode = jsonConvert.convert<String>(json['safetyProductionCode']);
  if (safetyProductionCode != null) {
    enterpriseInformationGetEntity.safetyProductionCode = safetyProductionCode;
  }
  final int? businessPushPersonnelId = jsonConvert.convert<int>(json['businessPushPersonnelId']);
  if (businessPushPersonnelId != null) {
    enterpriseInformationGetEntity.businessPushPersonnelId = businessPushPersonnelId;
  }
  final int? securotyPushPersonnelId = jsonConvert.convert<int>(json['securotyPushPersonnelId']);
  if (securotyPushPersonnelId != null) {
    enterpriseInformationGetEntity.securotyPushPersonnelId = securotyPushPersonnelId;
  }
  final int? dangerPushPersonnelId = jsonConvert.convert<int>(json['dangerPushPersonnelId']);
  if (dangerPushPersonnelId != null) {
    enterpriseInformationGetEntity.dangerPushPersonnelId = dangerPushPersonnelId;
  }
  final int? businessPushDeptId = jsonConvert.convert<int>(json['businessPushDeptId']);
  if (businessPushDeptId != null) {
    enterpriseInformationGetEntity.businessPushDeptId = businessPushDeptId;
  }
  final int? securotyPushDeptId = jsonConvert.convert<int>(json['securotyPushDeptId']);
  if (securotyPushDeptId != null) {
    enterpriseInformationGetEntity.securotyPushDeptId = securotyPushDeptId;
  }
  final int? dangerPushDeptId = jsonConvert.convert<int>(json['dangerPushDeptId']);
  if (dangerPushDeptId != null) {
    enterpriseInformationGetEntity.dangerPushDeptId = dangerPushDeptId;
  }
  final List<EnterpriseInformationGetInformationDOList>? informationDOList = (json['informationDOList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<EnterpriseInformationGetInformationDOList>(e) as EnterpriseInformationGetInformationDOList).toList();
  if (informationDOList != null) {
    enterpriseInformationGetEntity.informationDOList = informationDOList;
  }
  return enterpriseInformationGetEntity;
}

Map<String, dynamic> $EnterpriseInformationGetEntityToJson(EnterpriseInformationGetEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['createTime'] = entity.createTime;
  data['companyId'] = entity.companyId;
  data['enterpriseName'] = entity.enterpriseName;
  data['enterpriseAddress'] = entity.enterpriseAddress;
  data['creditCode'] = entity.creditCode;
  data['registeredCapital'] = entity.registeredCapital;
  data['securityManager'] = entity.securityManager;
  data['securityManagerNumber'] = entity.securityManagerNumber;
  data['enterpriseWeb'] = entity.enterpriseWeb;
  data['legalRepresentative'] = entity.legalRepresentative;
  data['legalRepresentativeNumber'] = entity.legalRepresentativeNumber;
  data['industryId'] = entity.industryId;
  data['industryName'] = entity.industryName;
  data['businessLicense'] = entity.businessLicense;
  data['businessTermStart'] = entity.businessTermStart;
  data['businessTermEnd'] = entity.businessTermEnd;
  data['businessTermRemind'] = entity.businessTermRemind;
  data['businessRemindId'] = entity.businessRemindId;
  data['businessRemindName'] = entity.businessRemindName;
  data['securotyLicense'] = entity.securotyLicense;
  data['securotyTermStart'] = entity.securotyTermStart;
  data['securotyTermEnd'] = entity.securotyTermEnd;
  data['securotyTermRemind'] = entity.securotyTermRemind;
  data['securotyRemindId'] = entity.securotyRemindId;
  data['securotyRemindName'] = entity.securotyRemindName;
  data['dangerLicense'] = entity.dangerLicense;
  data['dangerTermStart'] = entity.dangerTermStart;
  data['dangerTermEnd'] = entity.dangerTermEnd;
  data['dangerTermRemind'] = entity.dangerTermRemind;
  data['dangerRemindId'] = entity.dangerRemindId;
  data['dangerRemindName'] = entity.dangerRemindName;
  data['safetyProductionName'] = entity.safetyProductionName;
  data['safetyProductionCode'] = entity.safetyProductionCode;
  data['businessPushPersonnelId'] = entity.businessPushPersonnelId;
  data['securotyPushPersonnelId'] = entity.securotyPushPersonnelId;
  data['dangerPushPersonnelId'] = entity.dangerPushPersonnelId;
  data['businessPushDeptId'] = entity.businessPushDeptId;
  data['securotyPushDeptId'] = entity.securotyPushDeptId;
  data['dangerPushDeptId'] = entity.dangerPushDeptId;
  data['informationDOList'] = entity.informationDOList.map((v) => v.toJson()).toList();
  return data;
}

extension EnterpriseInformationGetEntityExtension on EnterpriseInformationGetEntity {
  EnterpriseInformationGetEntity copyWith({
    int? id,
    String? createTime,
    int? companyId,
    String? enterpriseName,
    String? enterpriseAddress,
    String? creditCode,
    String? registeredCapital,
    String? securityManager,
    String? securityManagerNumber,
    String? enterpriseWeb,
    String? legalRepresentative,
    String? legalRepresentativeNumber,
    int? industryId,
    String? industryName,
    String? businessLicense,
    String? businessTermStart,
    String? businessTermEnd,
    int? businessTermRemind,
    int? businessRemindId,
    String? businessRemindName,
    String? securotyLicense,
    String? securotyTermStart,
    String? securotyTermEnd,
    int? securotyTermRemind,
    int? securotyRemindId,
    String? securotyRemindName,
    String? dangerLicense,
    String? dangerTermStart,
    String? dangerTermEnd,
    int? dangerTermRemind,
    int? dangerRemindId,
    String? dangerRemindName,
    String? safetyProductionName,
    String? safetyProductionCode,
    int? businessPushPersonnelId,
    int? securotyPushPersonnelId,
    int? dangerPushPersonnelId,
    int? businessPushDeptId,
    int? securotyPushDeptId,
    int? dangerPushDeptId,
    List<EnterpriseInformationGetInformationDOList>? informationDOList,
  }) {
    return EnterpriseInformationGetEntity()
      ..id = id ?? this.id
      ..createTime = createTime ?? this.createTime
      ..companyId = companyId ?? this.companyId
      ..enterpriseName = enterpriseName ?? this.enterpriseName
      ..enterpriseAddress = enterpriseAddress ?? this.enterpriseAddress
      ..creditCode = creditCode ?? this.creditCode
      ..registeredCapital = registeredCapital ?? this.registeredCapital
      ..securityManager = securityManager ?? this.securityManager
      ..securityManagerNumber = securityManagerNumber ?? this.securityManagerNumber
      ..enterpriseWeb = enterpriseWeb ?? this.enterpriseWeb
      ..legalRepresentative = legalRepresentative ?? this.legalRepresentative
      ..legalRepresentativeNumber = legalRepresentativeNumber ?? this.legalRepresentativeNumber
      ..industryId = industryId ?? this.industryId
      ..industryName = industryName ?? this.industryName
      ..businessLicense = businessLicense ?? this.businessLicense
      ..businessTermStart = businessTermStart ?? this.businessTermStart
      ..businessTermEnd = businessTermEnd ?? this.businessTermEnd
      ..businessTermRemind = businessTermRemind ?? this.businessTermRemind
      ..businessRemindId = businessRemindId ?? this.businessRemindId
      ..businessRemindName = businessRemindName ?? this.businessRemindName
      ..securotyLicense = securotyLicense ?? this.securotyLicense
      ..securotyTermStart = securotyTermStart ?? this.securotyTermStart
      ..securotyTermEnd = securotyTermEnd ?? this.securotyTermEnd
      ..securotyTermRemind = securotyTermRemind ?? this.securotyTermRemind
      ..securotyRemindId = securotyRemindId ?? this.securotyRemindId
      ..securotyRemindName = securotyRemindName ?? this.securotyRemindName
      ..dangerLicense = dangerLicense ?? this.dangerLicense
      ..dangerTermStart = dangerTermStart ?? this.dangerTermStart
      ..dangerTermEnd = dangerTermEnd ?? this.dangerTermEnd
      ..dangerTermRemind = dangerTermRemind ?? this.dangerTermRemind
      ..dangerRemindId = dangerRemindId ?? this.dangerRemindId
      ..dangerRemindName = dangerRemindName ?? this.dangerRemindName
      ..safetyProductionName = safetyProductionName ?? this.safetyProductionName
      ..safetyProductionCode = safetyProductionCode ?? this.safetyProductionCode
      ..businessPushPersonnelId = businessPushPersonnelId ?? this.businessPushPersonnelId
      ..securotyPushPersonnelId = securotyPushPersonnelId ?? this.securotyPushPersonnelId
      ..dangerPushPersonnelId = dangerPushPersonnelId ?? this.dangerPushPersonnelId
      ..businessPushDeptId = businessPushDeptId ?? this.businessPushDeptId
      ..securotyPushDeptId = securotyPushDeptId ?? this.securotyPushDeptId
      ..dangerPushDeptId = dangerPushDeptId ?? this.dangerPushDeptId
      ..informationDOList = informationDOList ?? this.informationDOList;
  }
}

EnterpriseInformationGetInformationDOList $EnterpriseInformationGetInformationDOListFromJson(Map<String, dynamic> json) {
  final EnterpriseInformationGetInformationDOList enterpriseInformationGetInformationDOList = EnterpriseInformationGetInformationDOList();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    enterpriseInformationGetInformationDOList.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    enterpriseInformationGetInformationDOList.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    enterpriseInformationGetInformationDOList.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    enterpriseInformationGetInformationDOList.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    enterpriseInformationGetInformationDOList.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    enterpriseInformationGetInformationDOList.id = id;
  }
  final String? certificateName = jsonConvert.convert<String>(json['certificateName']);
  if (certificateName != null) {
    enterpriseInformationGetInformationDOList.certificateName = certificateName;
  }
  final String? beginTime = jsonConvert.convert<String>(json['beginTime']);
  if (beginTime != null) {
    enterpriseInformationGetInformationDOList.beginTime = beginTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    enterpriseInformationGetInformationDOList.endTime = endTime;
  }
  final int? termRemind = jsonConvert.convert<int>(json['termRemind']);
  if (termRemind != null) {
    enterpriseInformationGetInformationDOList.termRemind = termRemind;
  }
  final int? pushId = jsonConvert.convert<int>(json['pushId']);
  if (pushId != null) {
    enterpriseInformationGetInformationDOList.pushId = pushId;
  }
  final int? remindId = jsonConvert.convert<int>(json['remindId']);
  if (remindId != null) {
    enterpriseInformationGetInformationDOList.remindId = remindId;
  }
  final String? managementPicture = jsonConvert.convert<String>(json['managementPicture']);
  if (managementPicture != null) {
    enterpriseInformationGetInformationDOList.managementPicture = managementPicture;
  }
  final int? staffId = jsonConvert.convert<int>(json['staffId']);
  if (staffId != null) {
    enterpriseInformationGetInformationDOList.staffId = staffId;
  }
  final int? informationId = jsonConvert.convert<int>(json['informationId']);
  if (informationId != null) {
    enterpriseInformationGetInformationDOList.informationId = informationId;
  }
  final int? deptId = jsonConvert.convert<int>(json['deptId']);
  if (deptId != null) {
    enterpriseInformationGetInformationDOList.deptId = deptId;
  }
  final String? pushName = jsonConvert.convert<String>(json['pushName']);
  if (pushName != null) {
    enterpriseInformationGetInformationDOList.pushName = pushName;
  }
  return enterpriseInformationGetInformationDOList;
}

Map<String, dynamic> $EnterpriseInformationGetInformationDOListToJson(EnterpriseInformationGetInformationDOList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['certificateName'] = entity.certificateName;
  data['beginTime'] = entity.beginTime;
  data['endTime'] = entity.endTime;
  data['termRemind'] = entity.termRemind;
  data['pushId'] = entity.pushId;
  data['remindId'] = entity.remindId;
  data['managementPicture'] = entity.managementPicture;
  data['staffId'] = entity.staffId;
  data['informationId'] = entity.informationId;
  data['deptId'] = entity.deptId;
  data['pushName'] = entity.pushName;
  return data;
}

extension EnterpriseInformationGetInformationDOListExtension on EnterpriseInformationGetInformationDOList {
  EnterpriseInformationGetInformationDOList copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    String? certificateName,
    String? beginTime,
    String? endTime,
    int? termRemind,
    int? pushId,
    int? remindId,
    String? managementPicture,
    int? staffId,
    int? informationId,
    int? deptId,
    String? pushName,
  }) {
    return EnterpriseInformationGetInformationDOList()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..certificateName = certificateName ?? this.certificateName
      ..beginTime = beginTime ?? this.beginTime
      ..endTime = endTime ?? this.endTime
      ..termRemind = termRemind ?? this.termRemind
      ..pushId = pushId ?? this.pushId
      ..remindId = remindId ?? this.remindId
      ..managementPicture = managementPicture ?? this.managementPicture
      ..staffId = staffId ?? this.staffId
      ..informationId = informationId ?? this.informationId
      ..deptId = deptId ?? this.deptId
      ..pushName = pushName ?? this.pushName;
  }
}